package com.dingyang.learn.handmadespringframework.app;

import com.dingyang.learn.handmadespringframework.springframework.Autowired;
import com.dingyang.learn.handmadespringframework.springframework.Component;
import com.dingyang.learn.handmadespringframework.springframework.InitializingBean;

/**
 * @author dingyang
 */
@Component("aService")
public class AService implements IAService {

    @Autowired
    BService BService;

    public void say() {
        System.out.println(this + " say hello");
    }

    public String print() {
        return this + System.lineSeparator() + BService;
    }

    // @Override
    // public void afterPropertiesSet() {
    //     System.out.println(this + " afterPropertiesSet");
    // }

    @Override
    public void impl() {
        System.out.println(this + " impl");
    }
}
